package com.iatinspur.dubbo.test;

import org.junit.jupiter.api.Test;
import org.springframework.web.client.RestTemplate;

import java.util.HashSet;
import java.util.Set;

public class WebCluster {

    @Test
    public  void doTest() {
        RestTemplate restTemplate = new RestTemplate();
        Set<String>set =new HashSet<String>();
        for (int i = 0; i < 10000; i++) {
            set.add(restTemplate.getForObject("http://localhost:60106/getResult", String.class));
        }
        System.err.println(set);
    }


    @Test
    public  void doTest1() {
        RestTemplate restTemplate = new RestTemplate();
        Set<String>set =new HashSet<String>();
        for (int i = 0; i < 10000; i++) {
            set.add(restTemplate.getForObject("http://localhost:60106/dubboServerStream", String.class));
        }
        System.err.println(set);
    }


    @Test
    public  void doTest2() {
        RestTemplate restTemplate = new RestTemplate();
        System.err.println(restTemplate.getForObject("http://localhost:60106/dubboClientStream", String.class));
    }
}
